package com.xy.novelweb.controller;

import com.xy.novelweb.domain.Author;
import com.xy.novelweb.domain.Reader;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;

@Controller
@Slf4j
public class HeadPageController {
		@RequestMapping(path = "/")
		public String toIndex(Model model) {
				model.addAttribute("user_auth", new Author());
				model.addAttribute("user_reader", new Reader());
				log.info("index...");
				return "index";
		}
		@RequestMapping(path = "/index")
		public String index(Model model) {
				model.addAttribute("user_auth", new Author());
				model.addAttribute("user_reader", new Reader());
				log.info("index...");
				return "index";
		}
}
